Platform Explorer / Nuxeo Platform 2023.9

Extension point plugins

Documentation

The plugin system for the FileManager give the possibility to register extension that will be responsible for creating a document from a given mime-type. The plugin should implement the org.nuxeo.ecm.platform.filemanager.interfaces.FileImporter interface.

The registration of a file importer can be done like this:

    <plugin class="com.example.MyFileImporterImplementationClass"
        docType="MyCustomDoctype" enabled="true"
        name="myCustomFileImporter" order="30">
        <filter>text/plain</filter>
    </plugin>

The filter tag is used to know what mime-types can be used with the plugin. The order tag is used to determine order between plugins.

The docType attribute is optional. When added, an instance of the document type specified in it will be created. Otherwise, one of the default Nuxeo document types will be used.

A plugin can override an existing plugin by reusing the same name, in this case the previous filters will be ignored. A plugin can be completely disabled by setting enabled="false".

Similarly, to override the default behavior to import folders, custom folder importers are registered as follows:

    <folderImporter
        class="com.example.MyFolderImporterImplementationClass" name="myCustomFolderImporter"/>

The latest registered folder importer will be used in place of any other previously registered folder importer.

Finally is it also possible to register CreationContainerListProvider implementations for a given set of document types so as to provide the user with a list of container suitable for new document creation.

This feature is especially useful for the creation of new document from an office productivity application through the LiveEdit plugins.

The docType is optional: no docType declaration means all types are handled by the extension.

    <creationContainerListProvider
        class="com.example.MyCustomContainerListImplementationClass" name="myCustomContainerListProvider">
        <docType>File</docType>
        <docType>Note</docType>
    </creationContainerListProvider>

Contribution Descriptors

  • Class: org.nuxeo.ecm.platform.filemanager.service.extension.FileImporterDescriptor
  • Class: org.nuxeo.ecm.platform.filemanager.service.extension.FolderImporterDescriptor
  • Class: org.nuxeo.ecm.platform.filemanager.service.extension.CreationContainerListProviderDescriptor

Existing Contributions

Contributions are presented in the same order as the registration order on this extension point. This order is displayed before the contribution name, in brackets.

  • nuxeo-platform-3d-2023.9.10.jar /OSGI-INF/filemanager-contrib.xml
    <extension point="plugins" target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService">
        <plugin class="org.nuxeo.ecm.platform.threed.importer.ThreeDImporter" name="ThreeDPlugin" order="0">
          <!-- .dae -->
          <filter>model/vnd.collada\+xml</filter>
          <!-- .3ds -->
          <filter>application/x-3ds</filter>
          <!-- .fbx -->
          <filter>application/octet-stream</filter>
          <!-- .ply -->
          <filter>text/x-c</filter>
          <!-- .obj -->
          <filter>text/wavefront-obj</filter>
          <!-- .x3d -->
          <filter>model/x3d\+xml</filter>
          <!-- .stl -->
          <filter>application/sla</filter>
          <!-- .gltf -->
          <filter>model/gltf\+json</filter>
          <!-- .zip -->
          <filter>application/zip</filter>
        </plugin>
      </extension>
  • nuxeo-platform-audio-core-2023.9.10.jar /OSGI-INF/filemanager-importer-contrib.xml
    <extension point="plugins" target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService">
        <documentation>
          Simple plugin for the file manager. Creates a Audio Document type from
          any of the matching mime types.
        </documentation>
        <plugin class="org.nuxeo.ecm.platform.audio.extension.AudioImporter" name="AudioImporter" order="10">
          <filter>audio/.*</filter>
        </plugin>
      </extension>
  • nuxeo-platform-filemanager-2023.9.10.jar /OSGI-INF/nxfilemanager-plugins-contrib.xml
    <extension point="plugins" target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService">
        <documentation>
          Default plugins for the file manager.
    
          NoteImporter creates a Note document from any text-based content.
    
          DefaultFileImporter creates a File document from any content.
        </documentation>
    
        <plugin class="org.nuxeo.ecm.platform.filemanager.service.extension.NoteImporter" name="NoteImporter" order="10">
          <filter>text/plain</filter>
          <filter>text/html</filter>
          <filter>application/xhtml+xml</filter>
          <filter>text/x-web-markdown</filter>
        </plugin>
    
        <plugin class="org.nuxeo.ecm.platform.filemanager.service.extension.DefaultFileImporter" name="DefaultFileImporter" order="100">
          <filter>.*</filter>
        </plugin>
    
        <plugin class="org.nuxeo.ecm.platform.filemanager.service.extension.ExportedZipImporter" name="ExportedArchivePlugin" order="10">
          <filter>application/zip</filter>
        </plugin>
    
        <plugin class="org.nuxeo.ecm.platform.filemanager.service.extension.CSVZipImporter" name="CSVArchivePlugin" order="11">
          <filter>application/zip</filter>
        </plugin>
    
        <documentation>
          Use a query model to find the list of all Workspaces the user has the
          right to create new document into.
        </documentation>
        <creationContainerListProvider class="org.nuxeo.ecm.platform.filemanager.service.extension.DefaultCreationContainerListProvider" name="defaultCreationContainerListProvider"/>
      </extension>
  • nuxeo-platform-imaging-core-2023.9.10.jar /OSGI-INF/filemanager-plugins-contrib.xml
    <extension point="plugins" target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService">
        <documentation>
          Simple plugin for the file manager. Creates an Image document from
          any graphic file.
        </documentation>
        <plugin class="org.nuxeo.ecm.platform.picture.extension.ImagePlugin" name="Imageplugin" order="10">
          <filter>image/jpeg</filter>
          <filter>image/gif</filter>
          <filter>image/png</filter>
          <filter>image/tiff</filter>
          <filter>image/bmp</filter>
          <filter>image/x-ms-bmp</filter>
          <!-- RAW images mime type -->
          <filter>image/x-canon-cr2</filter>
          <filter>image/x-canon-crw</filter>
          <filter>image/x-nikon-nef</filter>
          <filter>image/x-adobe-dng</filter>
          <filter>image/x-panasonic-raw</filter>
          <filter>image/x-fuji-raf</filter>
          <filter>image/x-sigma-x3f</filter>
          <filter>image/x-pentax-pef</filter>
          <filter>image/x-kodak-dcr</filter>
          <filter>image/x-kodak-kdc</filter>
          <filter>image/x-sony-sr2</filter>
          <filter>image/x-sony-arw</filter>
          <filter>image/x-sony-srf</filter>
          <filter>image/x-minolta-mrw</filter>
          <filter>image/x-olympus-orf</filter>
          <filter>image/x-raw-epson</filter>
          <filter>image/x-portable-pixmap</filter>
          <filter>image/x-dpx</filter>
    
          <filter>image/raw</filter>
          <filter>image/x-raw</filter>
    
          <filter>image/svg.*</filter>
    
          <filter>application/photoshop</filter>
          <filter>application/illustrator</filter>
          <filter>application/postscript</filter>
        </plugin>
      </extension>
  • nuxeo-platform-video-2023.9.10.jar /OSGI-INF/filemanager-importer-contrib.xml
    <extension point="plugins" target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService">
        <documentation>
          Simple plugin for the file manager. Creates a Video Document type from
          any of the matching mime types.
        </documentation>
        <plugin class="org.nuxeo.ecm.platform.video.importer.VideoImporter" name="VideoImporter" order="10">
          <filter>video/.*</filter>
          <filter>application/gxf</filter>
          <filter>application/mxf</filter>
        </plugin>
      </extension>
  • nuxeo-routing-core-2023.9.10.jar /OSGI-INF/document-routing-nxfilemanager-plugins-contrib.xml
    <extension point="plugins" target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService">
    
        <plugin class="org.nuxeo.ecm.platform.routing.core.persistence.RouteModelsZipImporter" name="RouteModelsImporter" order="5">
          <filter>application/zip</filter>
        </plugin>
      </extension>